/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background-color: #f5f7fa;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* 响应式容器 */
.container {
    width: 100%;
    padding: 0 15px;
    margin: 0 auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* 导航栏样式 */
.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 12px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    color: #3498db;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    background-color: rgba(255,255,255,0.1);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 移动端菜单 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background-color: #2c3e50;
    padding: 20px;
    transition: right 0.3s;
    z-index: 1001;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu .close-btn {
    color: white;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    margin-bottom: 20px;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-menu-links a {
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.mobile-menu-links a:hover {
    background-color: rgba(255,255,255,0.1);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: 1.1rem;
}

.card-body {
    padding: 20px;
}

/* 主内容区 */
.main-content {
    padding: 30px 0;
}

/* 网格布局 */
.grid {
    display: grid;
    gap: 20px;
}

.grid-cols-1 {
    grid-template-columns: 1fr;
}

.grid-cols-3 {
    grid-template-columns: 2fr 1fr;
}

@media (max-width: 768px) {
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
}

/* 文章列表样式 */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.article-item {
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.article-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 10px;
}

/* 标签样式 */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 5px;
}

.badge-top {
    background-color: #e74c3c;
    color: white;
}

.badge-essence {
    background-color: #9b59b6;
    color: white;
}

.badge-recommend {
    background-color: #2ecc71;
    color: white;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table tr:hover {
    background-color: #f8f9fa;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* 模态框样式 */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1010;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-20px);
    transition: transform 0.3s;
}

.modal-backdrop.active .modal {
    transform: translateY(0);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #7f8c8d;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 版本记录样式 */
.version-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.version-item {
    padding: 15px;
    border-left: 3px solid #3498db;
    background-color: white;
    border-radius: 0 4px 4px 0;
}

.version-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.version-name {
    font-weight: 600;
    color: #2c3e50;
}

.version-date {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.version-changes {
    padding-left: 15px;
}

.version-changes li {
    margin-bottom: 5px;
    position: relative;
}

.version-changes li:before {
    content: "•";
    color: #3498db;
    font-weight: bold;
    position: absolute;
    left: -15px;
}

/* 页脚样式 */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

/* 后台统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin: 10px 0;
    color: #3498db;
}

.stat-label {
    color: #7f8c8d;
}

/* 文章详情页 */
.article-detail-header {
    margin-bottom: 30px;
}

.article-detail-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.article-detail-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

.article-detail-content p {
    margin-bottom: 15px;
}

.article-detail-content h2 {
    margin: 30px 0 15px;
    color: #2c3e50;
}

/* 登录/注册页面 */
.auth-container {
    max-width: 500px;
    margin: 50px auto;
}

.auth-title {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}